<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" lang="en" th:with="unixstamp=${#dates.createNow().time}">
<head th:replace="common::header"></head>
<style>
    .good-title{
        font-size : 33px;
        line-height : 1.5;
    }
</style>
<body>
	<div class="layui-fluid">
		<div class="layui-row">
			<div class="layui-col-md12">
				<div class="layui-card">
					<div class="layui-card-header t-title layui-bg-cyan mlk-title">商品新增管理</div>
					<div class="layui-card-body">
                        <div class="layui-container">
                            <div class="layui-row">
                                <div class="layui-col-md12">
                                    <!-- 商品主体信息-->
                                    <h3 class="layui-bg-gray good-title" >商品主体信息</h3>
                                    <form class="layui-form layui-form-pane" action="" lay-filter="addForm" id="addForm">
                                        <input type="hidden" name="id" th:value="${id}" id="orderId">
                                        <div class="layui-form-item" pane>
                                            <label class="layui-form-label">商品名称</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="name" required  lay-verify="required" placeholder="请输入商品名称" autocomplete="off" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item" pane>
                                            <label class="layui-form-label">关键词</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="keyword" required  lay-verify="required" placeholder="请输入关键词" autocomplete="off" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">产品类别</label>
                                            <div class="layui-input-block">
                                                <select name="typeId" lay-verify="required">
                                                </select>
                                            </div>
                                        </div>
                                        <div class="layui-form-item" pane>
                                            <label class="layui-form-label">品牌</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="branch" required  lay-verify="required" placeholder="请输入品牌" autocomplete="off" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item" pane>
                                            <label class="layui-form-label">价格</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="price" required  lay-verify="required" placeholder="请输入价格" autocomplete="off" class="layui-input">
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                            <div class="layui-row">
                                <div class="layui-col-md12">
                                    <!-- 商品主体信息-->
                                    <h3 class="layui-bg-gray good-title" >商品参数信息<button type="button" class="layui-btn layui-btn-normal" id="addGoodButton">添加参数信息</button></h3>
                                    <div id="addContentDiv"></div>
                                </div>
                            </div>
                            <div class="layui-row">
                                <div class="layui-col-md12">
                                    <!-- 商品介绍信息-->
                                    <h3 class="layui-bg-gray good-title" >商品介绍信息</h3>
                                    <textarea id="demo" style="display: none;"></textarea>
                                </div>
                            </div>
                            <div class="layui-row">
                                <div class="layui-col-md12">
                                    <!-- 商品图信息-->
                                    <h3 class="layui-bg-gray good-title" >商品图片</h3>
                                    <div class="layui-upload">
                                        <button type="button" class="layui-btn" id="test2">多图片上传</button>
                                        <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                            预览图：
                                            <div class="layui-upload-list" id="demo2"></div>
                                        </blockquote>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-row">
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button class="layui-btn layui-btn-fluid" id="submit">立即提交</button>
                                    </div>
                                </div>
                            </div>
                        </div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>


<div id="addContent" class="mlk-hide">
<div style="margin-top: 50px">
    <a href="#" class="layui-btn layui-btn-danger delGoodInfo">删除该项</a>
    <form class="layui-form layui-form-pane addItemForm" action="">
        <div class="layui-form-item" pane>
            <label class="layui-form-label">参数规格</label>
            <div class="layui-input-block">
                <input type="text" name="param" required  lay-verify="required" placeholder="请输入参数规格" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" pane>
            <label class="layui-form-label">积分最小占比</label>
            <div class="layui-input-block">
                <input type="text" name="minRate" required  lay-verify="required" placeholder="请输入积分最小占比(如0.1)" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" pane>
            <label class="layui-form-label">积分最大占比</label>
            <div class="layui-input-block">
                <input type="text" name="maxRate" required  lay-verify="required" placeholder="请输入积分最大占比(如0.1)" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" pane>
            <label class="layui-form-label">价钱</label>
            <div class="layui-input-block">
                <input type="text" name="price" required  lay-verify="required" placeholder="请输入参数规格对应的价钱" autocomplete="off" class="layui-input">
            </div>
        </div>
    </form>
</div>
</div>

<div th:include="common::footer"></div>
<script type="text/javascript" th:src="@{/js/good/addPage.js}"></script>
</html>